package org.snare.alumni.modules.admin.activity.service.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.snare.alumni.modules.admin.activity.dto.ActivityDTO;
import org.snare.alumni.modules.admin.activity.dto.ActivityUserDTO;
import org.snare.alumni.modules.admin.card.dto.CardDTO;
import org.snare.spider.common.base.Limit;
import org.snare.spider.service.annotation.ApiGet;
import org.snare.spider.service.annotation.ApiPost;
import org.snare.spider.service.annotation.ApiService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;
import java.util.Map;


@ApiService(mapping = "/alumni/activity", desc = "系统管理-校友活动")
public interface ActivityService {

    @ApiGet(mapping = {"/page"}, desc = "分页")
    IPage<ActivityDTO> page(ActivityDTO params, Limit limit);

    @ApiGet(mapping = {"/list"}, desc = "列表")
    List<ActivityDTO> list(ActivityDTO params);

    @ApiPost(mapping = {"/add"}, desc = "新增")
    void add(@RequestBody @Valid ActivityDTO params);

    @ApiPost(mapping = {"/edit"}, desc = "编辑")
    void edit(@RequestBody @Valid ActivityDTO params);

    @ApiGet(mapping = {"/detail"}, desc = "详情")
    ActivityDTO detail(@RequestParam String id);

    @ApiGet(mapping = {"/delete"}, desc = "删除")
    void delete(@RequestParam String id);

    @ApiPost(mapping = {"/signUp"}, desc = "报名")
    void signUp(@RequestParam String id, @RequestParam String uid);

    @ApiGet(mapping = {"/users"}, desc = "报名用户")
    IPage<ActivityUserDTO> users(@RequestParam String id, String status, String name, Limit limit);

    @ApiPost(mapping = {"/approve"}, desc = "审批")
    void approve(@RequestBody Map<String, Object> params);

}
